home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 9 / CU Amiga Magazine's Super CD-ROM 09 (1997)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-04].iso / dopus5 / installopus < prev    next >
Text File  |  1997-02-18  |  7KB  |  327 lines

  1. ; Script to install Directory Opus version 5.11
  2. ;
  3. ; Directory Opus Install Version $VER: Install-Opus 5.11 20.5.95
  4. ; COPYRIGHT ©1995 GP SOFTWARE, AUSTRALIA
  5. ;
  6.  
  7. (onerror
  8. ;    (makeassign "Opus511_Install" (safe))    
  9.     (makeassign "DOPUSDEST" (safe))    
  10. )
  11.  
  12.  
  13. (complete 0)
  14.  
  15. ;
  16. ;check user has Dos 2
  17. ;
  18.  
  19. (set DOSTYPE (/ (getversion) 65536))
  20. (if
  21.     (NOT (>= DOSTYPE 37))
  22.     (abort "Directory Opus 5 requires AmigaDOS 2.04 or higher."
  23.         " If you have an earlier version of AmigaDOS you must purchase an upgrade before using Opus 5.")
  24. )
  25.  
  26.  
  27. (set wbisgo 0)
  28.  
  29. ;
  30. ; just in case the installation was restarted
  31. ;
  32.  
  33. ;(makeassign "Opus511_Install" (safe))
  34.  
  35. ;
  36. ; see if this is really an update
  37. ;
  38.  
  39.  
  40. (set is_update 0)
  41. (set DOPus_Dest (getassign "DOpus5" "a"))
  42.  
  43.  
  44. ; if update, be sure they want program in same place
  45.  
  46. (if DOPus_Dest
  47.     (if    (askbool
  48.             (prompt "Opus 5 has already been installed on this system.\n"
  49.                 "The current copy is located in the drawer named \"" DOPus_Dest"\"."
  50.                 "\n\nDo you want this version installed in that drawer?"
  51.             )
  52.             (help
  53.                 "The installer has determined that you may already have a "
  54.                 "copy of Opus 5 installed on your system. If this is wrong or "
  55.                 "you want the update installed elsewhere, select NO as an "
  56.                 "answer. Otherwise, select YES."
  57.             )
  58.         (default 1)
  59.         )
  60.         (set is_update 1) ; if user wants in same place
  61.         (set DOPus_Dest   ; if user wants in different place
  62.             (tackon    (askdir
  63.                 (prompt "Directory Opus 5 will be installed in its own directory on your hard disk.\n\nWhere should the Opus 5 directory be created?")
  64.                     (help @askdir-help)
  65.                     (default @default-dest)
  66.                 )
  67.                 "Opus5"
  68.             )
  69.         )
  70.     )
  71.     (set DOPus_Dest ; else if not an update, get a location for program
  72.         (tackon
  73.             (askdir
  74.                 (prompt "Directory Opus 5 will be installed in its own directory on your hard disk.\n\nWhere should the Opus 5 directory be created?")
  75.                 (help @askdir-help)
  76.                 (default @default-dest)
  77.             )
  78.             "Opus5"
  79.         )
  80.     )
  81. )
  82.  
  83.  
  84. ; make DOpus drawer & icon if not there
  85.  
  86. (if     (not is_update)
  87.         (makedir DOPus_Dest (infos))
  88. )
  89.  
  90. ; at this point we have a valid destination, so we tell installer where
  91. ; the application will end up so the exit page will be correct -- also,
  92. ; the installation log file (if any) will be copied to the destination
  93.     
  94. (set @default-dest DOPus_Dest)
  95. (makeassign "DOPUSDEST" DOPus_dest (safe))
  96.  
  97. (working "Reading the Install disk for Directory Opus files.")
  98.  
  99. (copyfiles
  100.     (source "Opus511_Install:lhex")
  101.     (dest "ram:")
  102. )
  103.  
  104. (working "DeArchiving Directory Opus and related files.\n This will take a minute or so....")
  105.  
  106. (run "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x Opus511_Install:DO5.lha ")
  107.  
  108. ;
  109. ; tidyup
  110. ;
  111.  
  112. (run "c:protect DOPUSDEST:c/DopusRT5 +p")
  113. (run "c:protect DOPUSDEST:ARexx/#? +s")
  114.  
  115.  
  116. ;Install the Readme file
  117. ;
  118.  
  119. (copyfiles 
  120.     (source "Opus511_Install:ReadMe.511")
  121.     (dest DOPus_dest)
  122.     (infos)
  123.     (files)
  124. )
  125.  
  126. (complete 80)
  127.  
  128.  
  129. ;Get the users startup choices
  130. (set mode (askchoice
  131.     (prompt "Opus 5 can be started automatically when you boot your computer. What do you wish to do?")
  132.         (help    @askchoice-help    )
  133.         (choices "Start Opus 5 on boot"
  134.              "Start Opus 5 Iconified"
  135.              "Use Opus 5 as Workbench Replacement!"
  136.              "Do not start Directory Opus on boot") 
  137.         (default 0)
  138.     )
  139. )
  140.     
  141.     
  142.  
  143. (complete 90)
  144.     
  145.     
  146.         
  147. ; start on boot normal
  148.     (if (= mode 0)
  149.         (
  150.             (copyfiles
  151.                 (source (tackon DOPus_dest "wbstartup/Opus5_Startup"))
  152.                 (dest "SYS:WBStartup")
  153.                 (infos)
  154.  
  155.             )
  156.  
  157.             (tooltype
  158.                 (dest "SYS:WBStartup/Opus5_Startup")
  159.                 (settooltype "CX_POPUP" "YES")
  160.     
  161.             )
  162.         )
  163.     )
  164.  
  165.  
  166. ; start on iconified normal
  167.     (if (= mode 1)
  168.         (
  169.  
  170.             (copyfiles
  171.                 (source (tackon DOPus_dest "wbstartup/Opus5_Startup"))
  172.                 (dest "SYS:WBStartup")
  173.                 (infos)
  174.  
  175.             )
  176.  
  177.             (tooltype
  178.                 (dest "SYS:WBStartup/Opus5_Startup")
  179.                 (settooltype "CX_POPUP" "NO")
  180.     
  181.             )
  182.         )
  183.  
  184.     )
  185.  
  186.  
  187.     
  188. ; use as wb replacement
  189.  
  190.     (if (= mode 2)
  191.         (
  192.         (set wbisgo 1)
  193.  
  194.         (if (= (exists "c:loadwb") 1)
  195.             (rename "c:LoadWB" "c:LoadWB_old")
  196.         )
  197.  
  198.         (copyfiles
  199.             (source (tackon DOPus_dest "c/LoadDB"))
  200.             (dest "c:")
  201.         )
  202.         (rename "c:LoadDB" "c:LoadWB")
  203.         )
  204.     )
  205.  
  206.                     
  207. ; start on boot iconified
  208.                             
  209.  
  210. (complete 95)
  211.  
  212. ; modify S:User-Startup
  213.  
  214.  
  215. ; set the script for user startup
  216.  
  217.     (startup "DirectoryOpus 5"
  218.         (prompt
  219.         "The following instructions will added to your "
  220.         "\"S:User-Startup\" so that your system will be properly "
  221.         "configured to use Opus.\n\n"
  222.         "ASSIGN DOpus5: \"" DOpus_Dest "\"\n"
  223.         "PATH DOpus5:c Add \n"
  224.         )
  225.         (help "This will add commands to your S:user-startup file to "
  226.             "allow the correct operation of Directory Opus")
  227.         (command "ASSIGN DOpus5: \"" DOpus_Dest "\"\n")
  228.         (command "PATH DOpus5:c Add \n")
  229.     )
  230.  
  231.  
  232.  
  233.  
  234. (if    (askbool
  235.         (prompt"\nDo you wish to Install the ARexx LhADir archive to your Opus 5 Directory?\n\n"
  236.         "The LhADir archive was developed by Edmund Vermeulen.\nIt allows you to easily handle LHA and LZH files via Directory Opus 5\n")
  237.         (help "none")
  238.     )
  239.     (
  240.     (run "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x Opus511_Install:LhADirOpus5V10.lha")
  241.     (message "\nThe LhADir has been unarchived into your current Dopus5: drawer.\n"
  242.         "\nOnce you have finished the Opus 5.11 installation, please "
  243.         "open the dopus5:LhADir directory and double click on the "
  244.         "'Inslall LhADir' icon to complete the installation of LhADir\n")
  245.     )
  246. )
  247.  
  248.  
  249.  
  250. ;make sure assignment is set up so that Opus 5 can run
  251.     
  252.     (makeassign "DOpus5" DOPus_Dest)
  253.  
  254.     (textfile
  255.         (dest "RAM:serialise_cmd")
  256.         (append 
  257.         "dopus5:DirectoryOpus \n"
  258.         )
  259.     )
  260.  
  261.     (execute "RAM:serialise_cmd"
  262.         (prompt "Serialise Directory Opus 5 \n"
  263.             "---------------------------\n"
  264.             "To protect your valuable investment in Opus 5 "
  265.             "and complete the installation procedure, you "
  266.             " SERIALISE your copy of Opus 5 with your details and "
  267.             " the registration number from your installation disk.\n\n"
  268.             "By the way, now is also a good time to complete"
  269.             " the registration card and return it to your local"
  270.             " distributor.  Technical support and warranty will"
  271.             " only be honoured if a valid registration card has"
  272.             " been received."
  273.         )
  274.         (help
  275.             "Directory Opus 5 must be serialised before it will run. Please select continue and enter the registration and serialisation details."
  276.         )
  277.         (confirm)
  278.     )
  279.  
  280.     (run "delete ram:#?_cmd")
  281.     
  282.  
  283.  
  284.     (if (= wbisgo 1)
  285.         (
  286.         (message "Since you have selected to run Directory Opus"
  287.               " as a Workbench Replacement, please remove"
  288.               " all disks from floppy drives and REBOOT your computer.\n\n"
  289.               "*************************\n"
  290.               "****** WARNING **********\n"
  291.               "*************************\n"
  292.               " You MUST have serialised your copy of Opus 5 BEFORE you re-boot!"
  293.             )
  294.         )
  295.     )
  296.     
  297.  
  298.  
  299. ;     reinitialize assigns
  300.  
  301. (if (not @pretend)
  302.     (makeassign "DOpus5" DOPus_Dest)
  303.     
  304. )
  305.  
  306.  
  307. ;
  308. ;Display the ReadMe 
  309. ;
  310.  
  311. (if (> (run "Sys:Utilities/MultiView DOPUSDEST:ReadMe.511") 0)
  312.     (if (> (run "Sys:Utilities/AmigaGuide DOPUSDEST:ReadMe.511") 0)
  313.         (run "More DOPUSDEST:ReadMe.511")
  314.     )
  315. )
  316.  
  317.  
  318. (complete 100)
  319.  
  320. ; cleanup
  321. ;(makeassign "Opus511_Install" (safe))
  322. (makeassign "DOPUSDEST" (safe))    
  323.  
  324.  
  325. (exit text)
  326.  
  327.